The testing and development of application programming interfaces (API's) differs from that of the testing and development of software programs, since APIs are not complete software programs. Rather, API's are components that are used to develop and become part of complete software programs. Software program testing may involve the use of model based techniques, in which complete executable software programs are modeled to test particular software programs. API development is driven by an API specification that contains detailed information about each function, their parameters, return values and calling or sequencing constraints. API testing, on the other hand, is driven by the API specification and the API test specification. API testing involves the use of linear source code sequences that test the API's in controlled contexts. These controlled contexts are based on a number of test parameters and sequences, which are typically defined in the API test specification.
The API test specification may define a number of test functions and test variables with which to test the API. The API test specification also may reflect sequencing dependencies that are defined in the API specification. The test specification may also specify a number of conditions which must be satisfied to proceed though each test sequence. If the API specification defines allowable argument configurations for each API, the test specification typically reflects those argument configurations along with other argument configurations designed to test error handling.
In conventional API development processes, a test developer will use the API specification to manually generate test code for the API. For a number of reasons, this manual generation of test code is often a time consuming and tedious task. One reason is that typical API specifications may define large quantities of functions with highly complex sequencing dependencies and arguments, as well as a number of conditions that are required to proceed through each sequence. Furthermore, while conventional tools may be used by a developer to generate visual representations of the test parameters, there are no conventional tools that are capable of reading and interpreting visual representations to generate test code. For example, conventional diagramming tools such as, for example, Microsoft Visio™ from MICROSOFT Corp. of Redmond, Wash., may be used to diagram the sequencing dependencies among the test functions defined in an API specification. However, there is no conventional tool that is capable of reading and interpreting such a diagram, structurally manipulating the information therein, and using the information to generate API test code. Furthermore, while conventional word processors and spreadsheets may be used to specify argument configurations for the functions, there is no conventional tool that is capable of reading and interpreting a word processor or spreadsheet file, manipulating the information therein, and using the information to generate API test code. Accordingly, there is a need in the art for model based generation of API test code.